﻿namespace eg_009_常量
{
    internal class Program
    {
        class Circle
        {
            const double PI = 3.1415d;
            public readonly int Radius = 1; // 只读字段，并不是说不能修改。只能通过构造函数修改。
            public Circle(int radius) { Radius = radius; }
            public double Area() { return PI * Radius * Radius; }
        }
        static void Main(string[] args)
        {
            Circle circle = new Circle(10);
            Console.WriteLine(circle.Area());
        }
    }
}